<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function Star(username, sex, age, salary) {
            this.username = username;
            this.sex = sex;
            this.age = age;
            this.salary = salary;
            this.sing = function(sange) {
                console.log(sange)
            }
        }
        var lx = new Star('龟儿败东', '男', 22, 5000);
        console.log('姓名:' + lx.username + ' 性别:' + lx.sex + ' 年龄' + lx.age + ' 工资:' + lx.salary);
        lx.sing('秋雨');
    </script>
</head>

<body>

</body>

</html>